-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create migration files for upgrade from 1.0 to 1.5 #2962
Conversation
…reaction into seun-migration-1.0-1.5
// workflow object that keeps track of previous state. | ||
up: function () { | ||
Orders.find().forEach((order) => { | ||
const currentShipping = order.shipping[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be the hard-coded first shipping object or the shipping object associated with the current active shop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did that to staying consistent with 1.0 (or below 1.5) codebase. It's all x[0] in there. Since this migration file is interacting with data created from such code, I referenced it that way.
I think it's more recently that we started referencing shipping it by shopId (i.e marketplace).
One issue I'm seeing that could be resolved in the next ticket is that routes are different between 1.0 and 1.5. I'm not really sure the best way to resolve this, as it will probably need some type of redirect, and it will be different depending on the shop, especially if any shops in the 1.0 -> 1.4.3 have I think what we need is some way to define redirects within the app. This really will only be an issue for SEO, as pathfor, etc have been updated internally, but that's a pretty huge issue for any live shop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
Migrations run well up to version 15.
23:14:42.205Z INFO Reaction: Reaction Version: 1.5.0
23:14:42.278Z INFO Reaction: Migrating from version 3 -> 15
23:14:42.278Z INFO Reaction: Running up() on version 4
23:14:42.539Z INFO Reaction: Running up() on version 5
23:14:42.931Z INFO Reaction: Running up() on version 6
23:14:42.942Z INFO Reaction: Running up() on version 7
23:14:43.002Z INFO Reaction: Running up() on version 8
23:14:43.578Z INFO Reaction: Running up() on version 9
23:14:43.643Z INFO Reaction: Running up() on version 10
23:14:43.671Z INFO Reaction: Running up() on version 11
23:14:45.938Z INFO Reaction: Running up() on version 12
23:14:46.132Z INFO Reaction: Running up() on version 13
23:14:46.255Z INFO Reaction: Running up() on version 14
23:14:46.278Z INFO Reaction: Running up() on version 15
23:14:46.368Z INFO Reaction: Finished migrating.
23:14:46.687Z INFO Reaction: Reaction initialization finished.
=> Started your app.
=> App running at: http://localhost:3000/
Also seeing this issue here (same as what @mikemurray reported in #2938), but tested and it's also present in `marketplace right now, so not blocking for me.
|
Resolves in part #2938
How To Test:
91e18f26b7bc
. That's v1.0.0 commit. (You can also checkout into the tag if you have fetched it earlier).reaction reset -y && reaction
, create a few orders, and also add a product to cart without checking out.reaction pull marketplace
(I do this just to use cli to re-instal modules). Then, fetch+checkout into branchseun-migration-1.0-1.5
.reaction
again. Confirm that migrations run up to version 15.Next up to resolve will be Refunds (which is the error you'll be seeing in your console). This PR as is can still be merged will I start working separately to fix the other issues.
Other issues found (if related to migration) can be reported on the main ticket #2938.